perm filename COPY.RPH[S,DOC]4 blob
sn#068958 filedate 1973-10-26 generic text, type T, neo UTF8
COMMENT ⊗ VALID 00019 PAGES
RECORD PAGE DESCRIPTION
00001 00001
00004 00002
00005 00003 STANFORD ARTIFICIAL INTELLIGENCE LABORATORY MAY 1970
00006 00004 SAILON-61.1 COPY TABLE OF CONTENTS 1
00008 00005 SAILON-61.1 COPY I-1
00011 00006 SAILON-61.1 COPY II-1
00014 00007 SAILON-61.1 COPY II-2
00018 00008 SAILON-61.1 COPY II-3
00019 00009 SAILON-61.1 COPY III-1
00023 00010 SAILON-61.1 COPY III-2
00025 00011 SAILON-61.1 COPY IV-1
00029 00012 SAILON-61.1 COPY IV-2
00034 00013 SAILON-61.1 COPY IV-3
00039 00014 SAILON-61.1 COPY IV-4
00044 00015 SAILON-61.1 COPY IV-5
00046 00016 SAILON-61.1 COPY V-1
00050 00017 SAILON-61.1 COPY V-2
00052 00018 SAILON-61.1 COPY A-1
00055 00019 SAILON-61.1 COPY A-2
00058 ENDMK
⊗;
STANFORD ARTIFICIAL INTELLIGENCE LABORATORY MAY 1970
OPERATING NOTE 61.1
COPY
by
Richard P. Helliwell
Abstract
The system copy command is a general purpose program for moving
information from one logical file to another. Copy provides a
maximum of features with a minimum of work for the user. These
features are implemented through the use of "switches" which provide
great flexibility.
bbis work was supported in part by the The Advanced Research Projects
SAILON-61.1 COPY TABLE OF CONTENTS 1
SECTION I -- SYNTAX
Detailed description of the input
syntax to COPY.
SECTION II -- GENERAL RESTRICTIONS
Conventions, restrictions and
features available through COPY
which are not device dependent
(not including switches).
SECTION III -- DEVICE PECULIARITIES
Generated filenames, passwords,
the user disk pack, magtapes
written in save format, and a few
words about dectapes (ugh!).
SECTION IV -- SWITCHES
All the grand and glorious
things you get with switches,
like the ever popular fortran
format conversion switch.
SECTION V -- ADVANCED COMMANDS
Some other system commands
available through COPY.
APPENDIX A
A few examples to help you on
SAILON-61.1 COPY I-1
SECTION I -- SYNTAX
In this section the following rules are observed. Anything in
curly brackets is optional. Anything enclosed in brokets (e.g.
<.......>) has a syntactical definition of its own and is described
elsewhere. Upper and lower case letters are legal anywhere. A
break character is something which is not a letter, a number, or a
"*". This will become important when you try to figure out some of
the error messages. In this manual the term "sticky" means that the
sticky item is applicable until changed or until the end of the
current command.
The basic syntax for all copy commands is:
COPY {{<destination term>}{,<list term>}←}<source term>
"=" may be substituted for "←".
<destination term>::= <switch term>
<source term>::= <switch term>{,<source term>}
<switch term>::= {<switch list>space}<term>{<switch list>}
<list term>::= <term>
<term>::= {dev:}{filnam{.ext}}{[p,pn]}
| {<switch list>}{dev:}{[p,pn]}{<switch list>}
@<spec term>
<spec term>::= {<spec switch list>space}{dev:}{filnam{.ext}}
{[p,pn]}{<spec switch list>}
<switch list>::= {/<switch>}{(<page list>)}{<switch list>}
<spec switch list>::= {/<switch>}{<spec switch list>}
<page list>::= <page term>{,<page list>}
<page term>::= N{:M}
SAILON-61.1 COPY II-1
SECTION II -- GENERAL RESTRICTIONS
Copy reads data from the logical file(s) indicated by the
"source term", performs any operations requested by the "switch
term(s)", and writes the data on the logical file indicated by the
"destination term". Any listing information goes to the "list term".
Dev and p,pn are sticky in the source; that is, if they are
absent, the last one specified is used. The default device is DSK and
the default p,pn is blank (those of the current job).
A single "*" may be substituted for any of the following:
filnam
ext
p
pn
A "*" in the source term means "all". A "*" in the destination
term means "same as in source file being transferred".
If filnam.ext is absent in the destination term, "*.*" is
assumed. If the destination filnam.ext are specified (no *'s), all
source files will be concatenated into one big file with that name.
For example:
COPY DING←FOO,BAZ
would cause a file named DING to be created on your disk
area comprised of the files FOO and BAZ from your area.
If filnam.* or *.ext is used in the destination term, the source
files will be copied onto the destination one by one with the new
filname or extension. <destination term>← may be left out and
DSK:*.*← will be assumed. For source terms with directory devices
you must specify the filnam.ext.
If you try to write on top of a file which already exists, you
will be given the option of deleting it or not. If any of the
source files you have specified do not exist, you will be informed
and given the proper option.
If a string of source descriptors is specified the string is
SAILON-61.1 COPY II-2
You cannot write a file in two different modes (e.g.
FIL1←TTY:,DSK:FIL2). However FIL1←TTY:,DSK:FIL2/ASCII is quite
acceptable (/ASCII causes the data mode to be 0).
The <spec term> construct causes the scanner to continue
scanning in the file specified by the term. The term must indicate a
unique file. When end of file occurs the scanner again reads from the
teletype. No spec terms may appear in the file. Switches preceeding
the "@" are treated as sticky switches. Switches following the "@"
are treated as sticky switches only while reading from the indirect
file. In a sense the indirect file is a "program block". Upon leaving
the "block" all defaults are reset to those in force just before the
"@". A device name and p,pn may preceed the "@" in which case the
defaults are changed to those but no operation is done. The device
and p,pn used in the spec term do not affect the current defaults.
There is a page counter in copy which monitors ascii output for
form feeds. When a form feed is encountered the counter is
incremented. If a page list is used in a term, N is taken as the
starting page of this output and M (or N if M is absent) as the
ending page. Output is only active when the counter is within the
range of the page list (i.e. LIST COPY(21) would list page 21 of the
file COPY). When the end of the first term is exhausted control is
transferred to the next term, and so on until the right paren is
reached, in which case output ceases. If more than one file is
indicated, the page list is re-scanned for each one. Page lists are
never sticky.
Switches will be described in a section of their own. See /LIST
for an explanation of "list term".
Logical device names may be used but all switches apply to the
physical device. The following are legal physical devices for the
copy command:
DSK
UDP
DTAn
MTAn
TTYn
TTY
LPT
PTR
PTP
When the special character, "↓" (↑A on teletypes), appears the
scanner will read the line character-by-character without
interpretation until the next "↓" (or ↑A).
For numeric input there is always a default radix (either decmal
or octal). Sometimes, however, it is desirable to force one or the
SAILON-61.1 COPY II-3
octal. A number preceeded by a double quote is always interpreted in
SAILON-61.1 COPY III-1
SECTION III -- DEVICE PECULIARITIES
Non-Directory Devices:
If the source device doesn't have a directory and the filename
and/or extension is specified by a *, then a generated filename
and/or extension is used. The generated filename starts out as AAAAAA
and the generated extension starts as COP. Either of these may be
changed by specifying a filnam.ext in the source term. If a star is
used the old name is retained; otherwise it is replaced by the new
one. At the beginning of each term the filename is either changed to
that which was specified or incremented by one letter (i.e.
AAAAAZ.COP is followed by AAAABA.COP). The following example may
clear things up:
COPY DSK:*.*←MTA0:,,FOO.*,,*.BAZ
This would read 5 files from MTA0 and give them the following names:
AAAAAA.COP
AAAAAB.COP
FOO.COP
FOOA.COP
FOOB.BAZ
Disk:
If you attempt to write on an area which is protected by a
password you will be asked the password. If you answer <cr> to the
request for a password Copy will assume that you don't know it and do
the appropriate thing.
User Disk Pack:
Copy has all the routines to make access on the User Disk Pack
look like access on the regular disk. However, one must be sure to
format his user pack before trying to use it.
Dectapes:
Dectapes are assumed to be in PDP-6 format (which is the current
format our system uses). If the directory becomes full (more than 22
files) you will be told which was the first file not transferred. If
the dectape becomes full, the file currently being written may be
incomplete. An attempt is made to detect this condition before the
transfer is initiated, but this is not always possible. In order to
write on a dectape the OFF-WRITELOCK-WRITE switch must be in the
SAILON-61.1 COPY III-2
Magtapes:
Magtapes may be made to look like directory devices by use of
the /SAVE switch which is described later. All magtape switches are
separate for input and output (see rules about switches in switch
section). This means that magtape switches in the destination term
don't apply to the source terms.
Paper tape:
Paper tape I/O is done in binary non-checksummed mode unless
otherwise specified (see /ASCII). On input the paper tape reader must
be turned off to signify end of file. A paper tape with a jagged end
may cause spurious data to be read. It is best to tear it evenly at a
fold.
Teletypes:
Since some consoles cannot reproduce the full stanford character
set, COPY provides the standard stopgap conversion for output of some
special characters on model 33 and model 35 teletypes which are not
in full character set mode.
On those consoles which allow displaying, COPY displays the
SAILON-61.1 COPY IV-1
SECTION IV -- SWITCHES
Yes, Virginia, the copy command does have switches. Unlike PIP,
however, COPY doesn't need to be told to do something special for
"STOPGAP" format files. It knows what to do to which files and when.
This feature allows most files to be copied without the use of
switches.
Now a few rules about switches:
The term "sticky" means "applies until the end of the line
or until changed temporarily or pemanently by some means".
Most switches appearing in the destination term are
carried over as sticky switches in the source. Those
switches which are seperate for destination and source
terms are indicated by a star preceeding the switch name.
Switches appearing in the source term are sticky only if
they precede the term with which they appear.
Otherwise, they apply only to the current term and must
follow it. Only the first six characters of a switch are
scanned; the rest are thrown away. It is only necessary
to use enough characters to uniquely specify the switch.
The following switches are now available:
SWITCH *** ABBREV *********** MEANING ***************************
ASCII A This forces transfers to be in ascii.
Beware! This switch will cause stopgap line
numbers to become part of the text.
ASK ASK This causes dev:filnam.ext[p,pn] to be
printed for each file under consideration
followed by a question mark. If you answer
"Y" the operation will proceed, if you answer
"G" the operation will proceed but you will
not be asked the for the rest of the term,
otherwise the file will be skipped.
BINARY B This causes the data mode to be 13, and
forces word by word transfer of data.
BLOCKED BL This causes records to be ended on
output whenever they are ended on input.
CONVERT C This causes copy to treat the character
following a line feed and the first character
of a file as a fortran control character. Be
SAILON-61.1 COPY IV-2
*DENSITY=n DE This sets the density in bpi to n where
n equals 800, 556, or 200. This switch is
ignored for devices other than magtapes.
The default density is 556.
*DSPOOL DS This switch, when used with destination
or list terms, causes the output file to be
spooled with the /D switch. Output device
must be disk. This switch is illegal in
source terms.
DUMP DU This causes each 36 bit word from the
input device to be converted to the ascii
representation of the octal number it
represents and to then be sent to the output
device. The following format is used. A
"word number" is sent to the output device
which indicates which word in the file is the
first word in this row. Then 8 data words
are transferred. Then a <cr><lf> is inserted.
If desired, a page list may be used for /DUMP
however the values are those of words in the
file instead of pages.
*EVEN EV This sets magtape transfers to even
parity.
EXTRA=n EX Whenever a line feed is seen n extra
line feeds are put out; n must be an unsigned
decimal integer. If n=0 line feeds are
converted to a 177 followed by a 21, this
inhibits form ejection at page boundaries on
the line printer.
FAST F All the names specified by the source
term are listed (no size or other info).
This switch is therefore much faster than
/SEARCH.
FULL FU This forces all the directory info to be
printed under /SEARCH even if no list term
was specified.
GTOTAL G At the beginning of the execution of a
term the term is printed. At the end of the
term the TOTAL= is forced out, if any.
This switch implies /SEARCH.
HEADER H This causes a header to be put out at
what would be the top of each page on the
SAILON-61.1 COPY IV-3
DATE TIME FILNAM.EXT P,PN PAGE N-M
The current date and time are used,
where N is the logical page number (number of
form feeds seen plus one), and M is the
physical page of that logical page.
IGNI IGNI This causes input errors to be ignored
(no message).
IGNO IGNO This causes output errors to be ignored.
KILL K The input file is deleted after the
transfer is finished, even if the output
filename is the same as the input filename.
LIST L This causes the names of the files
transferred during that term to be listed. If
the input device is the disk the [p,pn] are
also listed. Non-directory devices will
obviously list nothing. The output will go
to the "list term". If the list term is
absent the output will go to the TTY.
*MLENGTH=nnnn M This allows the user to specify variable
length records for magtape I/O where nnnn is
a 1 to 4 digit number interpreted in octal
which specifies the number of data words per
record.
NONUMBERS N This deletes line numbers from files
that have them. This forces an ascii mode
transfer, in fact /NONUMBERS can be used on
any ascii transfer. Do not use this switch on
anything but text files or you will be sorry.
ODD OD This sets magtape transfers to odd
parity. This mode is standard and is the
default option.
OPTIMIZE OP This forces copy to believe that a file
is of stopgap format and therefore performs
all the proper magic. A file which has line
numbers or page marks at the ends of records
will be "fixed" by this switch.
PROTECTION=nnn P This causes the output file to have the
protection nnn where n is a digit from 0 to
7. If no protection switch is specified the
protection of the input file is used(for
non-disk input 000 is used). All three n's
SAILON-61.1 COPY IV-4
disk output. When concatenating files the
protection applicable to the first file
transferred is used.
QUIET Q This switch merely prevents you from
getting the message "File already
exists........." . If the output file
already exists, it is deleted without a
sound. Also, if this switch appears with
/SEARCH then only the p,pn and the size on
that p,pn are printed.
RENAME R A rename is done on the input file with
the output file information. /QUIET applies
when the output filnam.ext already exists.
*SAVE SA If the output device is a magtape, four
words of directory info are written. If the
input device is a magtape four words of
directory info are read and compared with the
source name specified. If they don't match,
that file is skipped and the next examined
until a match is found or the end of tape is
reached.
SEARCH SE This switch overrides all other switches.
It gives you more information than /LIST and
suppresses any transfers. Added to the /LIST
info you get the size of the file in 1K
blocks, the date and time it was last
written, the protection, and the mode it was
written in. This is preceded by a suitable
heading. The whole smear is preceded by the
current date and time. If the information
does not exist, it is not listed. If you try
to SEARCH a non-directory device, you will
get a strange answer. The output goes to the
same place as with /LIST with the following
variation. If the "list term" is omitted, the
listing goes to the TTY and the information
and heading for disk input will be truncated
to FILENAME.EXT, [P,PN], and SIZE. If /QUIET
is used with this switch and no list term was
specified only the p,pn and the total size of
each disk area is printed. If the input
device was the disk, and the file has been
dumped by DAEMON, the date last dumped is
printed followed by an "I" if it was an
SAILON-61.1 COPY IV-5
*SPOOL SP This is the same as /DSPOOL except that
the /D switch is not used in spooling the
file.
TITLE T This causes a "title page" to be put out
in large block letters followed by a form
feed. The title is of this form:
FILNAM.EXT
P,PN
TIME
DATE
The date and time are when the file was
last written. For non-directory devices,
<device name>: is printed in place of
SAILON-61.1 COPY V-1
SECTION V -- ADVANCED COMMANDS
The following is a list of the system commands which use copy
and how they work. The syntax is the same as for copy. See the user's
manual for the appropriate abbreviations.
COMMAND ********************* EFFECT ****************************
DELETE This deletes all the files specified by
the source term. If the 200 bit is on in the
file protection key, you will be asked if you
really want to delete the file. /QUIET
overrides this feature. The destination term
is interpreted as the list term. The list is
therefore illegal.
DIRECTORY This gives you all or part of the file
information for the source term(s). If /L
appears anywhere in the command string the
default list device will be set to the line
printer. The destination term is treated the
same as for DELETE.
LIST This sets the default output device to
the line printer and then turns on the
/HEADER switch.
PRINT This sets the default output device to
the line printer. Then it turns on the
/NONUMBERS and /TITLE switches.
RENAME This allows you to change the filename,
extension, p,pn, and protection of a file.
The format is newname←oldname. Use /P= to
change protection.
TRANSFER This copies files from one place to
another and deletes the source files. It is
subject to all COPY restrictions.
TYPE This sets the default output device to
the teletype.
The following commands are some special commands available through copy
SAILON-61.1 COPY V-2
SEND This creates files on the area 2,2
from the teletype. This is the system
"mailbox". If a message already exists your
message is concatenated to it. In addition
the p,pn of the current job are added at the
end of the message automatically. /NONUMBERS
is used during the transfer.
The following 4 formats of SEND are now
available:
SEND <pn> send message to programmmer "pn".
SEND *,<pn> same as SEND <pn>.
SEND <p>,* send message to project "p".
SEND <p>,<pn> send message to specific p,pn.
SEND * write NOTICE.TXT.
HELP name This types the file name[3,2] on the
teletype. If no argument is given or
confusion arises DIR *[3,2]/FAST is done.
This command is intended to give information
to losers about system programs. You need not
SAILON-61.1 COPY A-1
APPENDIX A
EXAMPLES:
COPY DTA4:←*.*
This would cause all the files on
your disk area to be written on DTA4.
COPY ←DTA4:*.*
This would cause all the files on
DTA4 to be written on your disk area.
COPY <filnam.ext>/NONUMBER
This would delete sequence numbers
(if any) from the file indicated.
COPY [2,RPH]←*.*[1,RPH]
This would cause all the files on
1,RPH to be copied onto 2,RPH no matter
who you are logged in under (subject to
file protection failure).
TYPE <filnam.ext>
This would cause the specified file
to be listed on the console you are
logged in on.
SEND <programmer number>
This would create a personal
message for the person specified by
<programmer number> by typing it in on
the tty (you will be told how to end it).
LIST <filnam.ext>(2)/NONUMBERS
This would cause page 2 of the
specified file to be listed on the line
printer with headers and without line
SAILON-61.1 COPY A-2
DIR LPT:←*.RPG[*,*]/SEARCH
This would cause the filnam.ext,
[p,pn], <size>, etc. for all files in
the world with the extension RPG to be
listed on the line printer.
COPY FOO←TTY:,FOO/ASCII
This would allow you to add text at
the beginning of the file FOO (/ASCII is
mandatory.).
RENAME FOO/PROTECTION=077
This would change the protection of
the file FOO to 077 without doing a
transfer.
PRINT FOO
This would cause the file called
FOO to be listed on the line printer
without line numbers and with a title
page.
DIR[*,RPH]/QUIET
This will tell RPH how many K
there are on each of his areas without
printing the filenames and other
information.
COPY TEMP←↓$ED$09↓.TMP
This copies the file $ED$09.TMP
into TEMP so that you can edit it. These
names are created by SOS.
DELETE @DEL
This would use the file DEL as a
list of files to be deleted. This method